Assignment problem Matching (graph theory) — — Hungarian algorithm https://en.wikipedia.org/wiki/Assignment_problem